<?php
namespace Users\Model;

class User
{
	public $user_id;
	public $username;
	public $company_name;
	public $company_contact_number;
	public $email;
	public $password;
	public $phone;
	public $country;
	public $state;
	public $city;
	public $address;
	public $type_of_user;
	public $u_status;
	public $added_date;
	public $modified_date;
	public $pincode;
	public $usercountry;
	public $userstate;
	public $admin_user_id;
	
	public function exchangeArray($data){
	
		$this->user_id  = (isset($data['user_id']))    ? $data['user_id']	: null;
		
		$this->username = (isset($data['username']))   ? $data['username']  : null;
		
		$this->company_name = (isset($data['company_name']))  ? $data['company_name']  : null;
		
		$this->company_contact_number = (isset($data['company_contact_number'])) ? $data['company_contact_number']  					 : null;
		
		$this->email  	= (isset($data['email']))  	? $data['email']  : null;		

		$this->password = (isset($data['password']))? $data['password'] : null;
		
		$this->phone  	= (isset($data['phone']))   ? $data['phone']  : null;
		
		$this->country  = (isset($data['country'])) ? $data['country']  : null;
		
		$this->state  	= (isset($data['state']))   ? $data['state']  : null;
		
		$this->city  	= (isset($data['city']))    ? $data['city']  : null;		
		
		$this->address  = (isset($data['address']))  ? $data['address']  : null;
		
		$this->pincode  = (isset($data['pincode']))  ? $data['pincode'] : null;
		
		$this->type_of_user = (isset($data['type_of_user'])) ? $data['type_of_user'] : null;
		
		$this->u_status  = (isset($data['u_status']))  ? $data['u_status']  	: null;
		
		$this->added_date = (isset($data['added_date'])) ? $data['added_date']	: null;
		
		$this->modified_date = (isset($data['modified_date'])) 	? $data['modified_date'] : null;
		
		$this->usercountry = (isset($data['usercountry'])) 	? $data['usercountry'] : null;
		
		$this->userstate = (isset($data['userstate'])) 	? $data['userstate'] : null;
		
		$this->admin_user_id = (isset($data['admin_user_id'])) 	? $data['admin_user_id'] : null;
		
	}

	// Add the following method:
	public function getArrayCopy()
	{
		return get_object_vars($this);
	}

}